package com.futureCloudMOM.core.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

@Data
@ApiModel("公用字段实体类")
public class FBaseEntity implements Serializable {

    @TableId(type = IdType.AUTO)
    @ApiModelProperty("主键ID")
    private Long id;
    @TableField(value = "sysCreateUser", fill = FieldFill.INSERT)
    @ApiModelProperty("创建用户")
//    @Dict(dictCode = "user_id",dictTable = "sys_user",dictText = "user_name")
    private Long sysCreateUser;
    @TableField(value = "sysCreateTime", fill = FieldFill.INSERT)
    @ApiModelProperty("创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date sysCreateTime;
    @TableField(value = "sysUpdateUser", fill = FieldFill.UPDATE)
    @ApiModelProperty("更新用户")
//    @Dict(dictCode = "user_id",dictTable = "sys_user",dictText = "user_name")
    private Long sysUpdateUser;
    @TableField(value = "sysUpdateTime", fill = FieldFill.UPDATE)
    @ApiModelProperty("更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date sysUpdateTime;
    @TableField(value = "deleted")
    @ApiModelProperty("删除标志（0-正常，1-删除）")
    @TableLogic
    private Integer deleted;

}
